//package com.ask.controller.test;
//
//import com.ask.dto.Result;
//import com.ask.service.utilService.KafkaProducerService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//@RestController
//@RequestMapping("/test/kafka")
//@Slf4j
//public class KafkaController {
//    @Autowired
//    private KafkaProducerService kafkaService;
//
//    @PostMapping("/send")
//    public Result sendMessage(String topic, String msg) {
//        kafkaService.sendMessage(topic, msg);
//        log.info("向topic-{} 发送 message-{}", topic, msg);
//        return Result.success();
//    }
//}
